package inner;

import java.util.*;

public class Hotel {
	private String name, addr, tele;
	public Card card;// = new Card("碗-199191911", "安徽省工商总局");
	private String no;// 加盟店编号

	public Hotel(String name, String addr, String tele) {
		super();
		this.name = name;
		this.addr = addr;
		this.tele = tele;
	}

	public Hotel(String name, String addr, String tele, String no) {
		super();
		this.name = name;
		this.addr = addr;
		this.tele = tele;
		this.no = no;
	}

	public void selfIntro() {
		System.out
				.println("这家宾馆张洋最爱，位于" + addr + ",电话是" + tele + ",名字叫" + name);
		System.out.println(">>>>>>>>>>>>>>经营信息：");
		card.show();

	}

	public void show() {
		System.out
				.println("这家宾馆张洋最爱，位于" + addr + ",电话是" + tele + ",名字叫" + name);
		System.out.println(">>>>>>>>>>>>>>经营信息：");
		// card.show();

	}

	public void clean(final String roomNo) {
		final Date time = new Date();
		class Worker {
			private String tele, name;

			public Worker(String tele, String name) {
				super();
				this.tele = tele;
				this.name = name;
			}

			public void doWork() {
				System.out.println("打扫同时的时候发现了营业信息:");
				card.show();

				System.out.println("在" + time + ",名叫" + name + "的工人正在清洁"
						+ Hotel.this.name + "的" + roomNo);
			}
		}
		Worker w = new Worker("192949439393", "王五");
		w.doWork();

	}

	// 执照
	public class Card {
		private String no;
		private String banfajigou;

		public Card(String no, String banfajigou) {
			super();
			this.no = no;
			this.banfajigou = banfajigou;
			start = new Date(100, 0, 1);
			end = new Date(119, 11, 31);
		}

		// public static void condi() {
		// System.out.println("必须用户宪法，用户我党领导！");
		// }

		public java.util.Date start, end;

		// Hotel.this 就是内部类持有的外部类的实例
		public void show() {
			System.out.println("这个营业执照编号是" + no + ",颁发机构：" + banfajigou);
			System.out.println("时间从" + start + "到" + end + "止");
			System.out.println("发给位于" + addr + "的" + name + "的加盟店"
					+ Hotel.this.no);
			Hotel.this.show();

		}
	}

	//
	public static class DustClear {
		private String brand;
		private double price;

		public DustClear(String brand, double price) {
			super();
			this.brand = brand;
			this.price = price;
		}

		public static void condi() {
			System.out.println("必须用户宪法，用户我党领导！");
		}

		@Override
		public String toString() {
			// TODO 自动生成的方法存根
			return "吸尘器品牌是" + brand + ",价格是" + price;
		}
	}
	//
}
